The process of designing instructions for a computer is called programming.
Everything a computer does is just 1's and 0's.
But humans don't communicate well in 1's and 0's.
So instead of programming in 1's and 0's, we use programming languages. We call instructions written in a programming language code.
Special programs translate code into 1's and 0's.
Python is:
We write code using a code editor.
Just like you write documents using a document editor (e.g Microsoft Word), there are programs to make writing code easer.
In this class we will use PyCharm. It is a code editor designed especially for Python.
A terminal is a program that gives us the ability to browse files and folders and run programs using only text.
PyCharm has a "built-in" terminal that we'll use in this class.
pwd
¶pwd
stands for print working directory.
It tells us the path to the current, or working, directory.
ls
¶ls
stands for list. It lists the files and folders in the working directory.
You can also specify the path you want to list.
cd
¶cd
stands for change directory.
You specify the path you want to change to, and that new path becomes the working directory.
Typing out paths and file names can be tedious.
Humans are also notorious for making typos.
Your terminal is eager to help you.
Start typing something. Press the tab key. What happens?
Press tab once to auto-complete whatever you are typing.
Sometimes, what you are typing is ambiguous (e.g. you typed cell
but there are files named cello-song.mp3
and cell-phone-plan.pdf
).
In these cases, depending on your terminal, you have some options: